package com.avoid.easymqtt.mqtt;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.mqtt.MqttMessage;

/**
 * 描述
 *
 * @author avoid@fiture.com
 * @date 2022/5/12
 * @motto Life is so short,do something to make yourself happy,such as coding
 */
public abstract class AsyncMqttRequestProcessor implements MqttRequestProcessor{

    public void asyncProcessRequest(ChannelHandlerContext ctx, MqttMessage message, MqttResponseCallback callback) throws Exception {
        MqttMessage response = processRequest(ctx, message);
        callback.callback(response);
    }

}
